﻿using Camc.Quality.QualityAnalysis.RFormBase;
using Camc.Quality.QualityAnalysis.RFormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.QualityAnalysis.RFormEntity
{
    public class R导管检查记录表 : RTableBase
    {
        public R导管检查记录表(int serialNum, Guid rWorkStepEntityId, Guid rProcessesEntityId, int sort, string fisrtDrawingNum,string recordRemark)
        {
            SerialNum = serialNum;
            RWorkStepEntityId = rWorkStepEntityId;
            RProcessesEntityId = rProcessesEntityId;
            Sort = sort;
            FisrtDrawingNum = fisrtDrawingNum;
            RecordRemark = recordRemark;
        }
        public override string FormName { get; protected set; } = "导管检查记录表";

        #region A4_图号
        public override string FisrtDrawingNum_DisplayName { get; protected set; } = "图号";

        #endregion

        /// <summary>
        /// 实测情况
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="measuredActual"></param>
        /// <returns></returns>
        public RMeasuredResultEntity SetMeasuredResult(RMeasuredResultEntity entity, string measuredActual)
        {

            entity.SetMeasuredActual(measuredActual, "问题记录");

            return entity;
        }

        /// <summary>
        /// 多媒体
        /// </summary>
        /// <param name="measuredValues"></param>
        public RMultiMediaEntity SetMultiMedia(RMultiMediaEntity entity, string photoNo)
        {
            entity.SetMultiMedia(photoNo, "缺陷照片");
            return entity;
        }

        /// <summary>
        /// 四检
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public RInspectionSignatureEntity SetInspectionSignature(RInspectionSignatureEntity entity, string firstOperator, DateTime? firstOperatorTime, string secondOperator, DateTime? secondOperatorTime, string thirdOperator, DateTime? thirdOperatorTime, string fourthOperator, DateTime? fourthOperatorTime)
        {
            entity.InspectionSignatureName = "四检";
            entity.SetFirstOperator(firstOperator, "解决人", firstOperatorTime, "解决人操作时间");
            entity.SetSecondOperator(secondOperator, "操作者", secondOperatorTime, "操作者操作时间");
            entity.SetThirdOperator(thirdOperator, "互检者",  thirdOperatorTime, "互检者操作时间");
            entity.SetFourthOperator(fourthOperator, "检验员", fourthOperatorTime, "检验员操作时间");
            return entity;
        }
    }
}
